import http from "./request";
import { IIssuePageData,IAddIssueData } from "./type";

// 分页获取问答
export const getIssue =  (data:IIssuePageData)=>{
    return http({
        url:"/api/issue/",
        method:"get",
        params:{...data}
    })
}
// 新增问答
export const addIssue = (data:IAddIssueData)=>{
    return http({
        url:"/api/issue/",
        method:"post",
        data
    })
}
// 根据id查找问答
export const getIssueById = (id:string)=>{
    return http({
        url:`/api/issue/${id}`,
        method:"get"
    })
}